#include <Arduino.h>
#include "./nvs/nvs.h"
#include "./keyboard/Keyboard.h"
#include "./NecPixel/NecPixel.h"

Nvs nvs;
NecPixel pixel;

TaskHandle_t handleTaskKeyBoard;
TaskHandle_t handleTaskTransmis;



void setup()
{
  Serial.begin(115200);
  Serial.println("Start");
  initArduino();

  nvs.initconfig();
  pixel.init();

#if IShost
  xTaskCreatePinnedToCore(
      Keyboard::keyboard_init,
      "keyboard_init",
      6144, // 栈大小
      NULL,
      15, // 任务优先级, with 3 (configMAX_PRIORITIES - 1) 是最高的，0是最低的.
      &handleTaskKeyBoard,
      0);
#else
  xTaskCreatePinnedToCore(
      Keyboard::transmission,
      "keyboard_transmission",
      6144, // 栈大小
      NULL,
      15, // 任务优先级, with 3 (configMAX_PRIORITIES - 1) 是最高的，0是最低的.
      &handleTaskTransmis,
      0);
#endif
}

void loop()
{

  //pixel.flicker();
  if (millis() < 3000)
  {
    
  }
  delay(1000);
  

  // Serial.println(WiFi.macAddress());
}
